home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _27352EA2CA1C4AA482ACA11DE88A7E73 < prev    next >
Encoding:
Text File  |  2004-01-06  |  1.2 KB  |  49 lines

  1. SoundSupressor = {
  2.     type = "AISoundSupressor",
  3.  
  4.     Properties = {
  5.         fRadius = 10,
  6.     },
  7.     Editor={
  8.         Model="Objects/Editor/Sound.cgf",
  9.     },
  10. }
  11.  
  12. ----------------------------------------------------------------------------------------
  13. function SoundSupressor:OnInit( )
  14.     self:OnReset();
  15. end
  16.  
  17.  
  18. ----------------------------------------------------------------------------------------
  19. function SoundSupressor:OnPropertyChange()
  20.     self:OnReset();
  21. end
  22.  
  23. ----------------------------------------------------------------------------------------
  24. function SoundSupressor:OnReset()
  25.     AI:RegisterWithAI(self.id, AIOBJECT_SNDSUPRESSOR, self.Properties.fRadius);    
  26.     self:EnableUpdate(1);
  27. end
  28.  
  29.  
  30. ----------------------------------------------------------------------------------------
  31. function SoundSupressor:Event_Enable()
  32.  
  33.     self:TriggerEvent(AIEVENT_ENABLE);
  34.  
  35. end
  36.  
  37. ----------------------------------------------------------------------------------------
  38. function SoundSupressor:Event_Disable()
  39.  
  40.     self:TriggerEvent(AIEVENT_DISABLE);
  41.  
  42. end
  43.  
  44. ----------------------------------------------------------------------------------------
  45. function SoundSupressor:OnShutDown()
  46.  
  47. end
  48.  
  49.